﻿Imports DTO
Imports System.Data.OleDb

Public Class TinhTrangDAO
    Public Function LayDSTinhTrang() As List(Of TinhTrangDTO)
        Dim sql As String = "Select MaTinhTrangSach,TenTinhTrangSach From TINHTRANGSACH"
        DataProvider.OpenConnecttion()
        Dim reader As OleDbDataReader = DataProvider.ExecSelect(sql)
        Dim ds As New List(Of TinhTrangDTO)()
        While reader.Read
            Dim bc As New TinhTrangDTO()
            bc.MaTinhTrangSach = reader.GetInt32(0)
            bc.TenTinhTrangSach = reader.GetString(1)
            ds.Add(bc)
        End While
        DataProvider.CloseConnect()
        Return ds
    End Function
End Class
